<?php /* Smarty version Smarty-3.1.19, created on 2017-11-08 15:52:24
         compiled from "/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/school/edit.html" */ ?>
<?php /*%%SmartyHeaderCode:11264336155a02b7b8123ae2-04100792%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'fdd290cde2cf9e78aa065402c39f0af54f1e7bfe' => 
    array (
      0 => '/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/school/edit.html',
      1 => 1506560930,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '11264336155a02b7b8123ae2-04100792',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'row' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5a02b7b8157dc5_81932657',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5a02b7b8157dc5_81932657')) {function content_5a02b7b8157dc5_81932657($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<div class="main-content">
<div class="page-content">
  <div class="page-content-area" style="opacity: 0.8;"> <br>
    <div class="page-header">
      <h1> 学校管理 <small><i class="ace-icon fa fa-angle-double-right"></i> <?php if ($_smarty_tpl->tpl_vars['row']->value['admin_id']) {?>编辑<?php } else { ?>新增<?php }?>学校 </small> </h1>
    </div>
    <div class="row">
      <div class="panel panel-default">
        <div class="panel-body table-responsive">
          <form method="post" class="form-horizontal" role="form" id="submitform" onsubmit="return false">
			<div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="name">名称</label>
                <input type="text" class="form-control" id="name" name="name" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['name'];?>
" required>
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="gname">管理员姓名</label>
                <input type="text" class="form-control" id="gname" name="gname" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['gname'];?>
">
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="email">登陆邮箱</label>
                <input type="text" class="form-control" id="email" name="email" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['email'];?>
" required>
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="password">密码</label>
                <input type="text" class="form-control" id="password" name="password" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['password'];?>
" required>
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="phone">联系电话</label>
                <input type="text" class="form-control" id="phone" name="phone" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['phone'];?>
">
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="address">所在地址</label>
                <input type="text" class="form-control" id="address" name="address" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['address'];?>
">
              </div>
            </div>
            <div class="form-group">
              <div class="col-md-6">
                <button type="submit" class="btn btn-primary btn-lg btn-submit">提交</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
var isbusy = false;
$(function(){
	$('#submitform').validate({
		focusInvalid: true,
		rules: {
			//title: {
				//required: true
			//}
		}
	});
	$('.btn-submit').click(function(){
		if(!$('#submitform').valid())return false;
		if(isbusy)return false;
		isbusy = true;
		tooltipbox.show('正在执行操作...');
		$.post(location.href, $('#submitform').serialize(), function(res){
		    if(res.code == 1){
				location.href = '<?php echo siteurl("con=admin/school");?>
';
			}
			tooltipbox.show(res.msg);	
			isbusy = false;
		}, 'json').error(function(a, b, c){
			tooltipbox.show('数据或网络错误');
			isbusy = false;
		});
	});
});
</script> 
<?php echo $_smarty_tpl->getSubTemplate ('public/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 <?php }} ?>
